private import base;

#infix("||",700);

# { ?X : ?R } ==> (function(X) is R);
# ?L || ?R ==> _map(L,R);

contract mappable over c is {
  _map has type for all e,f such that (c of e,(e)=>f) => c of f;
}

contract foldable over c determines e is {
  leftFold has type for all st such that ((st,e)=>st,st,c)=>st;
  rightFold has type for all st such that ((e,st)=>st,st,c)=>st;
}